module.exports = async function (ctx) {
  let { name } = JSON.parse(ctx.request.body)
  // console.log(name)
  let cookieId = `${name}_${new Date().getDate()}`
  ctx.cookies.set('token', cookieId)
  ctx.session[cookieId] = `session_${cookieId}`
  console.log('-----', ctx.session[cookieId])

  ctx.body = {
    code: 200,
    message: '用户登录成功'
  }
}